.class public Lcom/brixd/niceapp/model/UserModel;
.super Ljava/lang/Object;
.source "UserModel.java"

# interfaces
.implements Ljava/io/Serializable;


# static fields
.field public static final IDENTITY_NORMAL:I = 0x0

.field public static final IDENTITY_VIP:I = 0x1

.field private static final serialVersionUID:J = -0x4a9c80a3af0f3422L


# instance fields
.field private bgColor:Ljava/lang/String;

.field private bravos:I

.field private description:Ljava/lang/String;

.field private gender:Ljava/lang/String;

.field private image:Ljava/lang/String;

.field private isInvited:Z

.field private name:Ljava/lang/String;

.field private nick:Ljava/lang/String;

.field private openId:Ljava/lang/String;

.field private platform:Lcom/brixd/niceapp/service/LoginService$SNSPlatform;

.field private uid:I

.field private userIdentity:I

.field private weiboUid:J


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 12
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static parsePortalUserModel(Lorg/json/JSONArray;)Ljava/util/List;
    .registers 6
    .param p0, "jsonArray"    # Lorg/json/JSONArray;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/json/JSONArray;",
            ")",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/UserModel;",
            ">;"
        }
    .end annotation

    .prologue
    .line 158
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    .line 160
    .local v3, "userModels":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/UserModel;>;"
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_6
    invoke-virtual {p0}, Lorg/json/JSONArray;->length()I

    move-result v4

    if-ge v0, v4, :cond_60

    .line 161
    invoke-virtual {p0, v0}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v1

    .line 162
    .local v1, "jsonObject":Lorg/json/JSONObject;
    new-instance v2, Lcom/brixd/niceapp/model/UserModel;

    invoke-direct {v2}, Lcom/brixd/niceapp/model/UserModel;-><init>()V

    .line 164
    .local v2, "userModel":Lcom/brixd/niceapp/model/UserModel;
    const-string v4, "id"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v4

    iput v4, v2, Lcom/brixd/niceapp/model/UserModel;->uid:I

    .line 165
    const-string v4, "flowers"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v4

    iput v4, v2, Lcom/brixd/niceapp/model/UserModel;->bravos:I

    .line 166
    const-string v4, "avatar_url"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Lcom/brixd/niceapp/model/UserModel;->image:Ljava/lang/String;

    .line 167
    const-string v4, "bg_color"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Lcom/brixd/niceapp/model/UserModel;->bgColor:Ljava/lang/String;

    .line 168
    const-string v4, "gender"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Lcom/brixd/niceapp/model/UserModel;->gender:Ljava/lang/String;

    .line 169
    const-string v4, "career"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Lcom/brixd/niceapp/model/UserModel;->description:Ljava/lang/String;

    .line 170
    const-string v4, "name"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Lcom/brixd/niceapp/model/UserModel;->nick:Ljava/lang/String;

    .line 171
    iget-object v4, v2, Lcom/brixd/niceapp/model/UserModel;->nick:Ljava/lang/String;

    iput-object v4, v2, Lcom/brixd/niceapp/model/UserModel;->name:Ljava/lang/String;

    .line 172
    const-string v4, "identity"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v4

    invoke-virtual {v2, v4}, Lcom/brixd/niceapp/model/UserModel;->setUserIdentity(I)V

    .line 174
    invoke-interface {v3, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 160
    add-int/lit8 v0, v0, 0x1

    goto :goto_6

    .line 177
    .end local v1    # "jsonObject":Lorg/json/JSONObject;
    .end local v2    # "userModel":Lcom/brixd/niceapp/model/UserModel;
    :cond_60
    return-object v3
.end method

.method public static parseUserModel(Lorg/json/JSONObject;)Lcom/brixd/niceapp/model/UserModel;
    .registers 5
    .param p0, "jsonObj"    # Lorg/json/JSONObject;

    .prologue
    .line 133
    new-instance v1, Lcom/brixd/niceapp/model/UserModel;

    invoke-direct {v1}, Lcom/brixd/niceapp/model/UserModel;-><init>()V

    .line 134
    .local v1, "userModel":Lcom/brixd/niceapp/model/UserModel;
    const-string v2, "sns_type"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 135
    .local v0, "snsType":Ljava/lang/String;
    sget-object v2, Lcom/brixd/niceapp/service/LoginService$SNSPlatform;->QQ:Lcom/brixd/niceapp/service/LoginService$SNSPlatform;

    invoke-virtual {v2}, Lcom/brixd/niceapp/service/LoginService$SNSPlatform;->name()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_89

    .line 136
    sget-object v2, Lcom/brixd/niceapp/service/LoginService$SNSPlatform;->QQ:Lcom/brixd/niceapp/service/LoginService$SNSPlatform;

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setPlatform(Lcom/brixd/niceapp/service/LoginService$SNSPlatform;)V

    .line 140
    :goto_1c
    const-string v2, "uid"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setUid(I)V

    .line 141
    const-string v2, "weibo_uid"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optLong(Ljava/lang/String;)J

    move-result-wide v2

    invoke-virtual {v1, v2, v3}, Lcom/brixd/niceapp/model/UserModel;->setWeiboUid(J)V

    .line 142
    const-string v2, "openid"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setOpenId(Ljava/lang/String;)V

    .line 143
    const-string v2, "name"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setName(Ljava/lang/String;)V

    .line 144
    const-string v2, "description"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setDescription(Ljava/lang/String;)V

    .line 145
    const-string v2, "image"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setImage(Ljava/lang/String;)V

    .line 146
    const-string v2, "nick"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setNick(Ljava/lang/String;)V

    .line 147
    const-string v2, "invite_auth"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;)Z

    move-result v2

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setIsInvited(Z)V

    .line 148
    const-string v2, "bg_color"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setBgColor(Ljava/lang/String;)V

    .line 149
    const-string v2, "gender"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setGender(Ljava/lang/String;)V

    .line 150
    const-string v2, "flowers"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setBravos(I)V

    .line 151
    const-string v2, "identity"

    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setUserIdentity(I)V

    .line 154
    return-object v1

    .line 138
    :cond_89
    sget-object v2, Lcom/brixd/niceapp/service/LoginService$SNSPlatform;->Weibo:Lcom/brixd/niceapp/service/LoginService$SNSPlatform;

    invoke-virtual {v1, v2}, Lcom/brixd/niceapp/model/UserModel;->setPlatform(Lcom/brixd/niceapp/service/LoginService$SNSPlatform;)V

    goto :goto_1c
.end method


# virtual methods
.method public getBgColor()Ljava/lang/String;
    .registers 2

    .prologue
    .line 101
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserModel;->bgColor:Ljava/lang/String;

    return-object v0
.end method

.method public getBravos()I
    .registers 2

    .prologue
    .line 117
    iget v0, p0, Lcom/brixd/niceapp/model/UserModel;->bravos:I

    return v0
.end method

.method public getDescription()Ljava/lang/String;
    .registers 2

    .prologue
    .line 85
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserModel;->description:Ljava/lang/String;

    return-object v0
.end method

.method public getGender()Ljava/lang/String;
    .registers 2

    .prologue
    .line 93
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserModel;->gender:Ljava/lang/String;

    return-object v0
.end method

.method public getImage()Ljava/lang/String;
    .registers 2

    .prologue
    .line 69
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserModel;->image:Ljava/lang/String;

    return-object v0
.end method

.method public getName()Ljava/lang/String;
    .registers 2

    .prologue
    .line 61
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserModel;->name:Ljava/lang/String;

    return-object v0
.end method

.method public getNick()Ljava/lang/String;
    .registers 2

    .prologue
    .line 77
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserModel;->nick:Ljava/lang/String;

    return-object v0
.end method

.method public getOpenId()Ljava/lang/String;
    .registers 2

    .prologue
    .line 53
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserModel;->openId:Ljava/lang/String;

    return-object v0
.end method

.method public getPlatform()Lcom/brixd/niceapp/service/LoginService$SNSPlatform;
    .registers 2

    .prologue
    .line 29
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserModel;->platform:Lcom/brixd/niceapp/service/LoginService$SNSPlatform;

    return-object v0
.end method

.method public getUid()I
    .registers 2

    .prologue
    .line 37
    iget v0, p0, Lcom/brixd/niceapp/model/UserModel;->uid:I

    return v0
.end method

.method public getUserIdentity()I
    .registers 2

    .prologue
    .line 125
    iget v0, p0, Lcom/brixd/niceapp/model/UserModel;->userIdentity:I

    return v0
.end method

.method public getWeiboUid()J
    .registers 3

    .prologue
    .line 45
    iget-wide v0, p0, Lcom/brixd/niceapp/model/UserModel;->weiboUid:J

    return-wide v0
.end method

.method public isInvited()Z
    .registers 2

    .prologue
    .line 109
    iget-boolean v0, p0, Lcom/brixd/niceapp/model/UserModel;->isInvited:Z

    return v0
.end method

.method public setBgColor(Ljava/lang/String;)V
    .registers 2
    .param p1, "bgColor"    # Ljava/lang/String;

    .prologue
    .line 105
    iput-object p1, p0, Lcom/brixd/niceapp/model/UserModel;->bgColor:Ljava/lang/String;

    .line 106
    return-void
.end method

.method public setBravos(I)V
    .registers 2
    .param p1, "bravos"    # I

    .prologue
    .line 121
    iput p1, p0, Lcom/brixd/niceapp/model/UserModel;->bravos:I

    .line 122
    return-void
.end method

.method public setDescription(Ljava/lang/String;)V
    .registers 2
    .param p1, "description"    # Ljava/lang/String;

    .prologue
    .line 89
    iput-object p1, p0, Lcom/brixd/niceapp/model/UserModel;->description:Ljava/lang/String;

    .line 90
    return-void
.end method

.method public setGender(Ljava/lang/String;)V
    .registers 2
    .param p1, "gender"    # Ljava/lang/String;

    .prologue
    .line 97
    iput-object p1, p0, Lcom/brixd/niceapp/model/UserModel;->gender:Ljava/lang/String;

    .line 98
    return-void
.end method

.method public setImage(Ljava/lang/String;)V
    .registers 2
    .param p1, "image"    # Ljava/lang/String;

    .prologue
    .line 73
    iput-object p1, p0, Lcom/brixd/niceapp/model/UserModel;->image:Ljava/lang/String;

    .line 74
    return-void
.end method

.method public setIsInvited(Z)V
    .registers 2
    .param p1, "isInvited"    # Z

    .prologue
    .line 113
    iput-boolean p1, p0, Lcom/brixd/niceapp/model/UserModel;->isInvited:Z

    .line 114
    return-void
.end method

.method public setName(Ljava/lang/String;)V
    .registers 2
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 65
    iput-object p1, p0, Lcom/brixd/niceapp/model/UserModel;->name:Ljava/lang/String;

    .line 66
    return-void
.end method

.method public setNick(Ljava/lang/String;)V
    .registers 2
    .param p1, "nick"    # Ljava/lang/String;

    .prologue
    .line 81
    iput-object p1, p0, Lcom/brixd/niceapp/model/UserModel;->nick:Ljava/lang/String;

    .line 82
    return-void
.end method

.method public setOpenId(Ljava/lang/String;)V
    .registers 2
    .param p1, "openId"    # Ljava/lang/String;

    .prologue
    .line 57
    iput-object p1, p0, Lcom/brixd/niceapp/model/UserModel;->openId:Ljava/lang/String;

    .line 58
    return-void
.end method

.method public setPlatform(Lcom/brixd/niceapp/service/LoginService$SNSPlatform;)V
    .registers 2
    .param p1, "platform"    # Lcom/brixd/niceapp/service/LoginService$SNSPlatform;

    .prologue
    .line 33
    iput-object p1, p0, Lcom/brixd/niceapp/model/UserModel;->platform:Lcom/brixd/niceapp/service/LoginService$SNSPlatform;

    .line 34
    return-void
.end method

.method public setUid(I)V
    .registers 2
    .param p1, "uid"    # I

    .prologue
    .line 41
    iput p1, p0, Lcom/brixd/niceapp/model/UserModel;->uid:I

    .line 42
    return-void
.end method

.method public setUserIdentity(I)V
    .registers 2
    .param p1, "userIdentity"    # I

    .prologue
    .line 129
    iput p1, p0, Lcom/brixd/niceapp/model/UserModel;->userIdentity:I

    .line 130
    return-void
.end method

.method public setWeiboUid(J)V
    .registers 4
    .param p1, "weiboUid"    # J

    .prologue
    .line 49
    iput-wide p1, p0, Lcom/brixd/niceapp/model/UserModel;->weiboUid:J

    .line 50
    return-void
.end method
